﻿<%@ Page Title="人员管理" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="PersonnelManage.aspx.cs" Inherits="StoragePeriod.Web.SysManage.PersonnelManage" %>

<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .layout
        {
            background: url(../images/images_59.jpg) no-repeat;
        }
        .left-cloumn
        {
            display: none;
        }
        .right-cloumn
        {
            width: 944px;
        }
        #sms_title_li_0
        {
            background: url(../images/images_55.jpg) no-repeat;
        }
        .Left_Search
        {
            width: 190px;
            padding-left: 10px;
            height: 30px;
            border-top: 1px solid #ccc;
        }
        .right_Stafflist
        {
            overflow: auto;
        }
        .BasicData_right
        {
            width: 900px;
        }
        .BasicDataBtn
        {
            width: 900px;
        }
        .BasicDataList
        {
            width: 900px;
        }
    </style>
    <script type="text/javascript">
        function ShowDlg(isEdit) {
            $("#MainContent_HidIsEdit").val(isEdit);
            if (isEdit == 0) {
                $("#MainContent_txt_UserName").val("");
                $("#MainContent_txt_Email").val("");
                $("#MainContent_txt_Hometown").val("");
                $("#MainContent_txt_Political").val("");
                $("#MainContent_txt_EducatedLevel").val("");
                $("#MainContent_txt_QQ").val("");
                $("#MainContent_txt_Address").val("");
                $("#MainContent_txt_BirthDate").val("");
                $("#MainContent_txt_Specialty").val("");
                $("#MainContent_txt_Unit").val("");
                $("#MainContent_txt_IDNumber").val("");
                $("#MainContent_txt_JobTitle").val("");
                $("#MainContent_txt_MobileTelNo").val("");
                $("#MainContent_txt_Descriptions").val("");
            }
            $("#dialog-form").dialog('open');
        }

        function LoadData(UserName, OperationId, UserType, EMail, Hometown, Political, Sex, EducatedLevel, QQ, Address, BirthDate, Specialty, Unit, IDNumber, JobTitle, MobileTelNo, Descriptions) {
            $("#MainContent_txt_UserName").val(UserName);
            $("#MainContent_Drop_Operation").val(OperationId);
            $("#MainContent_Drop_Operation").trigger("onchange");
            $("#MainContent_Drop_Team").val(UserType);
            $("#MainContent_txt_Email").val(EMail);
            $("#MainContent_txt_Hometown").val(Hometown);
            $("#MainContent_txt_Political").val(Political);
            $("#MainContent_Drop_Sex").val(Sex);
            $("#MainContent_txt_EducatedLevel").val(EducatedLevel);
            $("#MainContent_txt_QQ").val(QQ);
            $("#MainContent_txt_Address").val(Address);
            $("#MainContent_txt_BirthDate").val(BirthDate);
            $("#MainContent_txt_Specialty").val(Specialty);
            $("#MainContent_txt_Unit").val(Unit);
            $("#MainContent_txt_IDNumber").val(IDNumber);
            $("#MainContent_txt_JobTitle").val(JobTitle);
            $("#MainContent_txt_MobileTelNo").val(MobileTelNo);
            $("#MainContent_txt_Descriptions").val(Descriptions);
        }

        function IsV() {
            var b = true;
            if ($("#MainContent_txt_UserName").val() == "") {
                b = false;
                alert("请输入用户名称！");
            }
            return b;
        }
        function alertstr(str) {
            alert(str);

        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainLeft" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="upPanelMain" runat="server">
        <ContentTemplate>
            <asp:HiddenField ID="HidIsEdit" runat="server" Value="0" />
            <asp:HiddenField ID="HidTypeID" runat="server" Value="" />
            <div class="sms_title">
                <ul>
                    <li><a href="OperationManage.aspx">基础设置</a></li>
                    <li><a href="PrivilegeManage.aspx">权限管理</a></li>
                    <li><a href="PersonnelManage.aspx" style="color: #f90;">人员管理</a></li>
                </ul>
            </div>
            <div class="sms_main">
                <div class="BasicData_right">
                    <div class="BasicDataBtn">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right" style="width: 60px;">
                                    单位：
                                </td>
                                <td align="left" style="width: 110px;">
                                    <asp:DropDownList ID="Drop_OperationSearch" runat="server" Style="width: 100px;"
                                        OnSelectedIndexChanged="Drop_OperationSearch_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 60px;">
                                    班组：
                                </td>
                                <td align="left" style="width: 110px;">
                                    <asp:DropDownList ID="Drop_TeamSearch" runat="server" Style="width: 100px;">
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 60px;">
                                    姓名：
                                </td>
                                <td align="left" style="width: 150px;">
                                    <asp:TextBox ID="txt_searchName" runat="server" CssClass="txt_0"></asp:TextBox>
                                </td>
                                <td align="left">
                                    <asp:Button ID="Btn_Search" runat="server" Text="查询" CssClass="btn_0" OnClick="Btn_Search_Click" />
                                </td>
                                <td align="right">
                                    <input type="button" id="Btn_TypeAdd" value="添加" class="btn_0" onclick="ShowDlg(0)" />
                                </td>
                                <td style="width: 10px;">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="BasicDataList">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BasicDataTable">
                            <thead>
                                <tr>
                                    <td style="width: 60px;">
                                        序号
                                    </td>
                                    <td>
                                        用户名称
                                    </td>
                                    <td>
                                        性别
                                    </td>
                                    <td>
                                        班组
                                    </td>
                                    <td>
                                        Email
                                    </td>
                                    <td>
                                        籍贯
                                    </td>
                                    <td>
                                        政治面貌
                                    </td>
                                    <td>
                                        学历
                                    </td>
                                    <td>
                                        专业
                                    </td>
                                    <td>
                                        身份证号
                                    </td>
                                    <td>
                                        所在单位
                                    </td>
                                    <td>
                                        职称
                                    </td>
                                    <td>
                                        电话号码
                                    </td>
                                    <td style="width: 60px;">
                                        编辑
                                    </td>
                                    <td style="width: 60px;">
                                        删除
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="RepDataList" runat="server" OnItemCommand="RepDataList_ItemCommand">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%=GetXH()%>
                                            </td>
                                            <td>
                                                <%#Eval("UserName")%>
                                            </td>
                                            <td>
                                                <%#Eval("Sex")%>
                                            </td>
                                            <td>
                                                <%#GetTeamName(Eval("UserType").ToString())%>
                                            </td>
                                            <td>
                                                <%#Eval("EMail")%>
                                            </td>
                                            <td>
                                                <%#Eval("Hometown")%>
                                            </td>
                                            <td>
                                                <%#Eval("Political")%>
                                            </td>
                                            <td>
                                                <%#Eval("EducatedLevel")%>
                                            </td>
                                            <td>
                                                <%#Eval("Specialty")%>
                                            </td>
                                            <td>
                                                <%#Eval("IDNumber")%>
                                            </td>
                                            <td>
                                                <%#Eval("Unit")%>
                                            </td>
                                            <td>
                                                <%#Eval("JobTitle")%>
                                            </td>
                                            <td>
                                                <%#Eval("MobileTelNo")%>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="RepBtn_Edit" CssClass="RepBtn_Edit" runat="server" CommandName="Edit"
                                                    CommandArgument='<%#Eval("id")%>' />
                                            </td>
                                            <td>
                                                <asp:Button ID="RepBtn_Del" CssClass="RepBtn_Del" runat="server" OnClientClick="return confirm('是否删除？');"
                                                    CommandName="Del" CommandArgument='<%#Eval("id")%>' />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </div>

                    <div style=" text-align:center;">
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="12" 
                            onpagechanged="AspNetPager1_PageChanged" >
                        </webdiyer:AspNetPager>
                    </div>

                </div>
            </div>
            <div class="sms_foot">
                <asp:HiddenField ID="hdRoleCode" runat="server" />
                <img src="../images/images_58.jpg" width="944" height="8" class="float_left" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="sp-dialog-box" id="dialog-form" style=" width:750px;" title="添加人员">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table class="sp-input-table " style=" width:720px;" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style=" width:70px">
                            用户名称：
                        </td>
                        <td>
                            <asp:TextBox runat="server" style=" width:100px" class="text ui-widget-content ui-corner-all" ID="txt_UserName" />
                        </td>
                        <td style=" width:70px">
                            性别
                        </td>
                        <td>
                            <asp:DropDownList ID="Drop_Sex" runat="server">
                                <asp:ListItem Value="男" Text="男"></asp:ListItem>
                                <asp:ListItem Value="女" Text="女"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style=" width:70px">
                            单位：
                        </td>
                        <td>
                            <asp:DropDownList ID="Drop_Operation" runat="server" AutoPostBack="true" OnSelectedIndexChanged="Drop_Operation_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td style=" width:70px">
                            班组：
                        </td>
                        <td>
                            <asp:DropDownList ID="Drop_Team" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Email：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Email" />
                        </td>
                        <td>
                            籍贯
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Hometown" />
                        </td>
                        <td>
                            政治面貌：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Political" />
                        </td>
                        <td>
                            学历：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_EducatedLevel" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            QQ：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_QQ" />
                        </td>
                        <td>
                            地址
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Address" />
                        </td>
                        <td>
                            出生日期：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all ui-datapicker"
                                ID="txt_BirthDate" />
                        </td>
                        <td>
                            专业：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Specialty" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            所在单位：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_Unit" />
                        </td>
                        <td>
                            身份证号：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_IDNumber" />
                        </td>
                        <td>
                            职称：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_JobTitle" />
                        </td>
                        <td>
                            电话号码：
                        </td>
                        <td>
                            <asp:TextBox style=" width:100px" runat="server" class="text ui-widget-content ui-corner-all" ID="txt_MobileTelNo" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            说明：
                        </td>
                        <td colspan="7">
                            <asp:TextBox runat="server" class="text ui-widget-content ui-corner-all" TextMode="MultiLine"
                                Style="height:40px;width:630px;" ID="txt_Descriptions" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="8">
                            <asp:Button Text="提交" CssClass="die" runat="server" ID="btPost" OnClientClick="return IsV()"
                                OnClick="btPost_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
